package org.dey.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.One;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.dey.pojo.Menu;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author deyran
 * @date 2022/3/22 21:33
 * @classname
 * @see
 */
@Repository
public interface MenuMapper extends BaseMapper<Menu> {

    @Select("SELECT * FROM t_menu")
    @Results(
            id = "MenuMapper", value = {
            @Result(id = true, column = "id",property = "id"),
            @Result(column = "name",property = "id"),
            @Result(column = "linkUrl",property = "linkUrl"),
            @Result(column = "path",property = "path"),
            @Result(column = "priority",property = "priority"),
            @Result(column = "icon",property = "icon"),
            @Result(column = "description",property = "description"),
    })
    List<Menu> MENUS_ROLE();

}
